<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../common/base_body_header.jsp" %>
<%@include file="../common/navbar.jsp" %>
<%@include file="../common/page_content_pre.jsp" %>
<div class="page-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="widget-box">
                <div class="widget-header">
                    <h4>课程详情</h4>
                </div>

                <div class="widget-body">
                    <div class="widget-main no-padding">
                        <form class="form-horizontal" modelAttribute="course" action="" method="post">
                            <fieldset>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label"></label>

                                    <div class="col-sm-5">
                                        <span class="input-xlarge">课程名：${cours.coursName}</span>
                                    </div>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label"></label>

                                    <div class="col-sm-5">
                                        <span>
                                            课程类型：
                                            <c:if test="${cours.coursType == '1'}">普通</c:if>
                                            <c:if test="${cours.coursType == '2'}">高级</c:if>
                                        </span>
                                    </div>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label"></label>

                                    <div class="col-sm-5">
                                        <span>
                                            课程级别：
                                            <c:if test="${cours.level == '1'}">普通</c:if>
                                            <c:if test="${cours.level == '2'}">优先</c:if>
                                        </span>
                                    </div>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label"></label>

                                    <div class="col-sm-5">
                                        <span>课程数量：共${cours.count}节课</span>
                                    </div>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label"></label>

                                    <div class="col-sm-5">
                                        <span>课程序号：第${cours.courseNumber}节课</span>
                                    </div>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label"></label>

                                    <div class="col-sm-6">
                                        <span>视频:</span>

                                        <div class="layui-form-item">
                                            <div class="layui-inline" id="upload_preview">
                                                <video src="${cours.videoUrl}" width="500" height="300"
                                                       controls="controls"/>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label"></label>

                                    <div class="col-sm-7">
                                        <span>视频说明：${cours.vidoeDesc}</span>
                                    </div>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label"></label>
                                    <input id="audioUrl" name="audioUrl" type="hidden">

                                    <div class="col-sm-6">
                                        <span>音频：</span>
                                        <div></div>
                                        <div>
                                            <div class="layui-inline" id="uploadAudio_preview">
                                                <audio src="${cours.audioUrl}" width="500" controls="controls"/>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label"></label>

                                    <div class="col-sm-7">
                                        <span>音频说明：${cours.audioDesc}</span>
                                    </div>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label"></label>

                                    <div class="col-sm-6">
                                        <span>描述:</span>
                                        <div></div>
                                        <textarea id="content" name="content" type="text" class="form-control"
                                                  rows="8" >${cours.content}</textarea>
                                    </div>
                                </div>
                            </fieldset>

                            <div class="form-actions center">
                                <button type="button" class="btn btn-sm btn-grey" id="go_back_btn">
                                    返回
                                    <i class="icon-reply icon-on-right bigger-110"></i>
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>

<%@include file="../common/page_content_suf.jsp" %>
<%@include file="../common/script.jsp" %>
<%@include file="../common/css.jsp" %>

<script type="text/javascript">
    $(document).ready(function () {
        $("#go_back_btn").on("click", function () {
            goBack();
        });
    });

    function goBack() {
        document.location.href = "${GLOBAL.basePath}/course/list";
    }
</script>
